package com.springMVCStudy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    // 对外访问的地址，到handlerMapping注册的注解
    @RequestMapping("springMVC/hello")
    // 直接返回字符串给前端，不找试图解析器
    @ResponseBody
    public String sayHello() {

        System.out.println("HelloController.hello");

        return "Hello springMVC!!!";
    }
}
